package com.card323.crpg.io.msn;

import java.awt.Color;

import net.sf.jml.message.MsnInstantMessage;

import com.card323.crpg.io.MessageSender;

public class MSNMessageSender implements MessageSender {

	String _email;

	public MSNMessageSender(String email) {
		_email = email;
	}

	public void send_message(String msg) {
		MsnInstantMessage imsg = new MsnInstantMessage();
		imsg.setContent(msg);

		MSNReceiverManager.getInstance().get_board(_email)
				.sendMessage(imsg, false);
	}

	public void send_message(String msg, Color c) {
		MsnInstantMessage imsg = new MsnInstantMessage();
		imsg.setContent(msg);
		if (c != null)
			imsg.setFontRGBColor(c.getRGB());
		MSNReceiverManager.getInstance().get_board(_email)
				.sendMessage(imsg, false);

	}

	public void send_error_message(String msg) {
		send_message( msg, Color.RED);
		
	}

}
